<?php
require('init.php');
@$i = $_REQUEST['uid'];
if($i===null || $i===""){
	die('uid required');
}
@$n = $_REQUEST['user_name'];
if($n===null || $n===""){
	die('user_name required');
}
@$g = $_REQUEST['gender'];
if($g===null || $g===""){
	die('gender required');
}
@$p = $_REQUEST['phone'];
if($p===null || $p===""){
	die('phone required');
}
@$m = $_REQUEST['email'];
if($m===null || $m===""){
	die('email required');
}

$sql="update user set user_name='$n',gender='$g ',phone='$p',email='$m' where uid=$i";
$result=mysqli_query($conn,$sql);
if($result){
    echo "更新成功";
}